<!DOCTYPE html>
<html>

<head>
    <include file="Share:meta" />
    <script type="text/javascript" src="../Public/plugins/echarts/echarts.common.min.js"></script>
    <style type="text/css">
        .trstyle0 {
            background-color: #e8e8e8;
        }
    </style>
</head>

<body oncontextmenu="self.event.returnValue=false" ondragstart="return false" class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <include file="Share:header" />
        <include file="Share:left" />
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>顾客未消费预警<small><a target="_blank"></a></small></h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active">顾客未消费预警</li>
                </ol>
            </section>
            <!-- Main content -->
            <section class="content">
                <div class="box">
                    <div id="main" style="width: 100%;height:500px;"></div>
                </div>
            </section>
            <!-- /.content -->
            <section class="content">

                <div class="box">

                    <div class="box-header with-border" style="height: 50px;">
                        <div class="box-tools" style="width: 80%; ">
                            <div class="row">
                                <form action="" method="GET" role="form">

                                    <div class="col-xs-3 np" style="line-height: 35px;">
                                        <select name="shopid" id="shopid" class="form-control" >
                                            <option value="">请选择门店</option>
                                            <volist name="shoplist" id="vo">
                                                <option value="{$vo.tid}">{$vo.shopname}</option>
                                            </volist>
                                        </select>
                                        <script type="text/javascript">
                                        $('#shopid').val('{$Think.get.shopid}');
                                        </script>
                                    </div>

                                    <div class="col-xs-5 " style="line-height: 35px;">
                                        <select name="time" id="time" class="form-control" required="required">
                                            <option value="oneweek">未消费1周</option>
                                            <option value="twoweek">未消费2周</option>
                                            <option value="threeweek">未消费3周</option>
                                            <option value="onemonth">未消费1月</option>
                                            <option value="twomonth">未消费2月</option>
                                            <option value="threemonth">未消费3月</option>
                                            <option value="fourmonth">未消费4月</option>
                                            <option value="fivemonth">未消费5月</option>
                                            <option value="sixmonth">未消费6月</option>
                                            <option value="ninemonth">未消费9月</option>
                                            <option value="oneyear">未消费1年</option>
                                            <option value="twoyear">未消费2年</option>
                                        </select>
                                        <script type="text/javascript">
                                            $('#time').val('{$fromTime}');
                                        </script>
                                    </div>

                                    <div class="col-xs-2 input-group-btn">
                                        <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>

                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>姓名</th>
                                <th>性别</th>
                                <th>
                                    联系方式
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <notempty name="list">
                                <volist name="list" id="vo">
                                    <tr>
                                        <td>{$vo.realname}</td>
                                        <td>
                                        <switch name="vo.sex" >
                                        <case value="1" break="1">男</case>
                                        <case value="0" break="1">女</case>
                                        <default />保密
                                        </switch>
                                        </td>
                                        <td>{$vo.mobile}</td>
                                    </tr>
                                </volist>
                            <else />
                                <tr>
                                    <td colspan="3"></td>
                                </tr>
                            </notempty>
                            
                        </tbody>
                    </table>
                </div>
            </section>
        </div>
        <!-- /.content-wrapper -->
        <include file="Share:copyright" />
        <include file="Share:setting" />
    </div>
    <include file="Share:js" />
    <script type="text/javascript">
        $("#reportManage").addClass("active");
        $("#consumed_list_2").addClass("active");
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        option = {
            title: {
                text: '顾客未消费预警'
            },
            tooltip : {
                trigger: 'axis'
            },
            legend: {
                data:{$date}
            },
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    boundaryGap : true,
                    data : {$date}
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : {$value}
        };


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</body>

</html>
